

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" type="image/png" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="CodeHope">
  <meta name="author" content="CodeHope">
  <meta name="keywords" content="希望">
  <title>CodeHope</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"quancundexiwang.wang","root":"/","version":"1.8.7","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":true,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"onlypost":true},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":"Mi65hxq7VAFUDwOLeIGAOgiV-gzGzoHsz","app_key":"hMuhiD4FRqhns4giqLiEH9HG","server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.3.0"></head>


<body>
  <header style="height: 100vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>CodeHope</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                村头
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                我
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('http://qiniuyun.quancundexiwang.wang/20210509090921.png') repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.5)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="就爱吃番茄炒鸡蛋，最好加个鸡蛋！">
              
            </span>

            
          </div>

          
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      <div class="container nopadding-x-md">
        <div class="py-5" id="board"
          style=margin-top:0>
          
          <div class="container">
            <div class="row">
              <div class="col-12 col-md-10 m-auto">
                


  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/40111/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学es之es6中新的数据类型Symbol">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/40111/">Javascript-重学es之es6中新的数据类型Symbol</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/40111/">
          
          
            
          
          数据类型Symbol基本介绍
 Symbol是一种新的原始数据类型，Symbol在中文中是符号， 象征的意思，符号一般都是独一无二的，这也代表了这个数据类型的特点。

因为 Symbol 是原始数据类型，不是对象。虽然使用它的时候它是大写字母开头，我们也可以直接定义一个Symbol类型的值,不用使用new关键字

定义无描述信息的Symbol

let s1 = Symbol();
console
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-19 07:43" pubdate>
              2021-01-19
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/46826/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之es6中的类和对象">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/46826/">Javascript-重学Es之es6中的类和对象</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/46826/">
          
          
            
          
          es6中的类和对象es5中的类和对象
class关键字class Person &#123;
    constructor(name, age) &#123; //constructor构造函数,new的时候执行
        this.name = name;
        this.age = age;
    &#125;
&#125;

const p1 = new Person('
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-16 23:00" pubdate>
              2021-01-16
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/62126/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之es5中的类和对象">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/62126/">Javascript-重学Es之es5中的类和对象</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/62126/">
          
          
            
          
          es5中的类和对象面向对象和面向过程
 大象装进冰箱,在面向过程和面向对象，分别如何思考？



面向过程:

1.打开冰箱

2.把大象装进冰箱

3.关上冰箱


面向对象：

1.冰箱对象！（长宽属性足够装下大象，有开关门，制冷的方法等等）
2.大象对象！（大象也有长宽高属性，走路，吼叫的方法等等）
3.能把大象举起来放入冰箱的神秘力量的对象！（足够的力气的属性，举东西的方法）
只有定义的对
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-15 09:21" pubdate>
              2021-01-15
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/55525/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之深拷贝和浅拷贝">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/55525/">Javascript-重学Es之深拷贝和浅拷贝</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/55525/">
          
          
            
          
          深拷贝和浅拷贝浅拷贝
深拷贝和浅拷贝最根本的区别在于是否真正获取一个对象的复制实体，而不是引用

每创建一个新的对象，const obj = &#123;a:1,b:2&#125;,就会在堆内存中开辟出一个新的空间，而变量保存的是对象的内存地址（对象的引用），


当我们进行变量赋值的时候，const obj2 = obj;，这种写法，只是在栈内存中新建了一个变量obj2,然后指向了堆内存的同一个
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-14 23:54" pubdate>
              2021-01-14
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3748185643,1969760247&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/3133567/" target="_self">
          <img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3748185643,1969760247&fm=26&gp=0.jpg" style="object-fit:contain;" alt="工具-记一次配合七牛云CDN加速，优化搜索XML配置">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/3133567/">工具-记一次配合七牛云CDN加速，优化搜索XML配置</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/3133567/">
          
          
            
          
          记一次配合七牛云CDN加速，优化搜索XML配置因为自己的博客是一个静态博客，什么是静态！

就是没有 服务端，没有数据库，没有后台配合管理，三无产品的博客！


在这样的静态博客下面我是用的是，将自己的静态文件打包成一个XML文件，因为XML文件可以根据XPATN语法很方便的检索，所以就选用了这个解决方案

打包完后的XML文件大概是这个样子的

最近发现自己的搜索，越来越慢，我以为是我的xml文
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-14 14:36" pubdate>
              2021-01-14
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%88%86%E7%B1%BB/">分类</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E6%A0%87%E7%AD%BE/">标签</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=656059099,2833408846&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/88165089/" target="_self">
          <img src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=656059099,2833408846&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Tools-Vscode配置文件">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/88165089/">Tools-Vscode配置文件</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/88165089/">
          
          
            
          
          VSCODE配置&#123;
	"workbench.editor.closeEmptyGroups": false,
  "emmet.triggerExpansionOnTab": true,
   "background.useDefault": false,
    "background.customImages": [
        "/Users/codehope/wallpape
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-13 17:05" pubdate>
              2021-01-13
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%B7%A5%E5%85%B7/">工具</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E9%85%8D%E7%BD%AE/">配置</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/c1f5d59f/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之对象的扩展">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/c1f5d59f/">Javascript-重学Es之对象的扩展</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/c1f5d59f/">
          
          
            
          
          对象的扩展属性简写const user = 'ChangHao'
const age = 22
const data = &#123;
    user:user,
    age:age
&#125;
console.log(data) //&#123;user: "ChangHao", age: 22&#125;
const user = 'ChangHao'
const age = 22
c
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-13 16:37" pubdate>
              2021-01-13
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/c6821a82/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之箭头函数">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/c6821a82/">Javascript-重学Es之箭头函数</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/c6821a82/">
          
          
            
          
          箭头函数
 我们先看一些es5定义函数的细节

我们在es5定义函数，有两种方式
function sum1(a, b) &#123; //定义一个sum函数
    return a + b
&#125;

const sum2 = function (a, b) &#123; //定义一个函数，赋值给num变量
    return a + b;
&#125;
这两种定义方式有什么区别呢
co
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-13 09:21" pubdate>
              2021-01-13
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/e8691c7a/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之函数的扩展">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/e8691c7a/">Javascript-重学Es之函数的扩展</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/e8691c7a/">
          
          
            
          
          函数的扩展默认参数es5默认参数的写法
const fun = function (a,b)&#123;
    a = a || 1;
    b = b || 1;
    return a+b;
&#125;
console.log(fun()) //2
es6默认参数的写法
const fun = function (a = 1, b = 1) &#123;
    return a + 
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-12 16:15" pubdate>
              2021-01-12
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>

  <div class="row mx-auto index-card" style="position: relative;">
    <div style="background: url('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg') repeat center center;
      background-size: cover;filter:blur(3px);width:100%;height:100%;position:absolute;filter:blur(30px);opacity:.4;">
    </div>
    
    
      <div class="col-12 col-md-4 m-auto index-img" >
        <a href="/posts/af99bbd3/" target="_self">
          <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3061114379,1415696030&fm=26&gp=0.jpg" style="object-fit:contain;" alt="Javascript-重学Es之数组的新的扩展">
        </a>
      </div>
    
    <article class="col-12 col-md-8 mx-auto index-info">
      <h1 class="index-header">
        
        <a href="/posts/af99bbd3/">Javascript-重学Es之数组的新的扩展</a>
      </h1>

      <p class="index-excerpt">
        <a href="/posts/af99bbd3/">
          
          
            
          
          数组的扩展类数组，伪数组
类数组(伪数组): Array-like和数组很像,有length属性,但是没有数组的方法。


函数内置的arguments对象;
function testArguments()&#123;
    console.log(arguments)
    console.log(arguments instanceof Array) //false
&#125;
tes
        </a>
      </p>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>
            <time datetime="2021-01-12 15:39" pubdate>
              2021-01-12
            </time>
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E5%89%8D%E7%AB%AF/">前端</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/JavaScript%E5%9F%BA%E6%9C%AC%E5%8A%9F/">JavaScript基本功</a>
            
              <a href="/tags/es6%EF%BC%8C7%EF%BC%8C8%EF%BC%8C9%EF%BC%8C10/">es6，7，8，9，10..</a>
            
          </div>
        
      </div>
    </article>
  </div>



  <nav aria-label="navigation">
    <span class="pagination" id="pagination">
      <a class="extend prev" rel="prev" href="/page/5/"><i class="iconfont icon-arrowleft"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/4/">4</a><a class="page-number" href="/page/5/">5</a><span class="page-number current">6</span><a class="page-number" href="/page/7/">7</a><a class="page-number" href="/page/8/">8</a><span class="space">&hellip;</span><a class="page-number" href="/page/11/">11</a><a class="extend next" rel="next" href="/page/7/"><i class="iconfont icon-arrowright"></i></a>
    </span>
  </nav>
  
  <script>
    for (ele of document.getElementById("pagination").getElementsByTagName("a")) {
      ele.href += '#board';
    }
  </script>



              </div>
            </div>
          </div>
        </div>
      </div>
    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
    

  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  
  <!-- 备案信息 -->
  <div class="beian">
    <span>
      <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
        豫ICP备20009912号-1
      </a>
    </span>
    
  </div>


  
</footer>

<!-- SCRIPTS -->

  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":true,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    
  



  
    
  









  <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "http://qiniuyun.quancundexiwang.wang/xmlSearch.xml";
      var inputArea = document.querySelector("#local-search-input");
      inputArea.onclick = function () {
        searchFunc(path, 'local-search-input', 'local-search-result');
        this.onclick = null
      }
    })()
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>



</body>
</html>
